package com.tech.demo.controller;

import com.tech.demo.entity.Customer;
import com.tech.demo.service.LoginService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@Api("login")
@RestController
@RequestMapping("/login")
public class LoginController {

    @Autowired
    LoginService loginService;

    @ApiOperation(value = "login",notes="测试 login数据" ,httpMethod="POST")
    @ResponseBody
    @RequestMapping(value = "/showLogin")
    //http://localhost:8080/login/showLogin
    public Customer showLogin(){
        return loginService.query();
    }

}
